package com.runing.controller;


import com.runing.config.ResponseWrapper;
import com.runing.entity.RSemester;
import com.runing.service.impl.RSemesterServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lel
 * @since 2021-03-11
 */
@RestController
@RequestMapping("/rSemester")
@Api(tags = "学期管理")
public class RSemesterController {
    @Autowired
    RSemesterServiceImpl rSemesterService;

    @ApiOperation("查询学期列表")
    @GetMapping("/getSename")
    public ResponseWrapper getSename(){
        List<RSemester> list =  rSemesterService.findAllRSemester();
        ResponseWrapper wrapper = ResponseWrapper.markSuccess(list);
        wrapper.getData().put("semesterBeans",list);
        return wrapper;
    }

}

